Inspection method and apparatus for the inspection of either random or repeating patterns

ABSTRACT

The present invention is a hybrid technique for finding defects on digitized device images using a combination of spatial domain and frequency domain techniques. The two dimensional spectra of two images are found using Fourier like transforms. Any strong harmonics in the spectra are removed, using the same spectral filter on both spectra. The images are then aligned, transformed back to the spatial domain, and subtracted. The resulting spectrally-filtered difference image is thresholded and analyzed for defects. Use of the hybrid technique of the present invention to process digitized images results in the highest-performance and most flexible defect detection system. It is the best performer on both array and random devices, and it can cope with problems such as shading variations and the dark-bright problem that no other technique can address. The hybrid technique of the present invention also uses frequency domain techniques to align the images with fewer errors than spatial domain techniques of similar or lesser complexity. Further, the relative offsets of the pairs of images are determined by frequency domain techniques—and this method may be the most accurate and the least expensive.

FIELD OF THE INVENTION

[0001] The present invention is related to the inspection of a first device pattern by comparing that device pattern with a second device pattern where those patterns may be on different dies, different device patterns on the same die, repeating patterns within the same device, on paper, or stored in memory. More particularly, the present invention relates to device pattern inspection where the pattern to be inspected is a random pattern, a repeating pattern, or a combination of the two.

BACKGROUND OF THE INVENTION

[0002] The types of patterns that are found on devices, particularly those in the production of semiconductor devices, are categorized as either random, repeating, or a combination of the two. This categorization is important in that, historically, random and repeating patterns have been inspected optically in the spatial domain, whereas repeating patterns are more easily inspected in the frequency domain. Also, in the early semiconductor technologies the repeating pattern was not readily used. More recently, with the advent of VLSI technologies, memory arrays have become quite common, and therefore of interest in the rapid inspection of devices with repeating patterns.

[0003] There are numerous techniques used for spatial optical inspection of a first device by means of comparison of that device with a second device. These techniques use either a real second device, or the desired attributes of the device to be inspected stored in memory, against which the first device is compared. Where a real device is used for the comparison, there are a variety of techniques that permit one to compare the first device against a separate second device, to compare two dies on the same device, or to compare repeating arrays within the same die.

[0004] In each comparison it is noted whether the devices are the same, within any selected tolerances, or whether they are different. Typically, the second device then becomes the first and a third becomes the second and another comparison is performed again noting whether they are the same or different. In this way it is possible to determine which of the devices are good and which ones are bad since it is presumed that the majority of devices will be good, therefore those which are not in that group are presumed to be defective.

[0005] Most of the high speed inspection systems that are currently available inspect the pattern in the spatial domain, no matter what the characteristics of the pattern are. However, the inspection of repeating patterns, but not random patterns, is greatly facilitated by the performance of the inspection in the frequency domain.

[0006] In order to improve the inspection time of repeating patterns, In-Systems, Inc. developed an entirely optical technique that uses a special lens system that is device specific (U.S. Pat. No. 4,806,774, issued Feb. 21, 1989). This system projects a two dimensional image through a lens which yields a Fourier transform of that image in the back aperture plane. Then, through the use of a hologram that is specific to the repeating pattern of the device being inspected, the In-Systems method filters out the harmonic frequencies from the resulting frequency domain image of the device, thus removing the frequency domain attributes of any repeating pattern from the other features of the device that is being inspected.

[0007] The In-Systems inspection system does the inspection entirely optically. In-Systems' method passes the 2-dimensional image through a lens resulting in a two dimensional Fourier transform of the device image. That image is then directed to a photographic plate that has been developed by shining light on it from a test device, so that the higher the light intensity of the Fourier transform of the image the more that develops on the plate. The photographic plate serves as a filter that depends on the intensity of the image on the photographic plate, i.e. there is a direct correlation between the amount of light that fell on the photographic plate and the density of the image on the photographic plate. So in areas where there is a lot of density on the plate, it filters to the same extent. The In-Systems filter is limited to being just in the areas where the Fourier transform is strong which may include off harmonic areas. It is meant for harmonics but nevertheless because of the way that the filter is made it will filter out those frequencies.

[0008] The filter is developed from the light shining on it from a test device. During the inspection process, light from a device that is to be analyzed is directed through a Fourier transform structure as described above and stored in a hologram. A laser is then shone through the hologram and the same lens to cancel out any aberrations introduced by the lens. The point is that when In-Systems filters in the frequency domain they are constrained to filtering everywhere that the Fourier transform is significantly strong.

[0009] In the In-Systems optical approach the image of the device is not scanned and digitized to perform the inspection. This means that the In-Systems method described above can only look at arrays, since the transform techniques are not suitable for non-repeating patterns. If non-repeating patterns are inspected using the In-Systems approach, the spectral components in the frequency domain will be scattered and not produce a meaningful spectrum that presents a frequency pattern that can be processed.

[0010] It would be desirable to have an inspection method and apparatus that combines inspection domains to inspect each type of pattern in the domain that is more favorable to the inspection of that type of pattern. That is use the frequency domain for the inspection of the repeating patterns (which is superior to spatial domain inspection of repeating patterns) and spatial domain inspection of the random patterns (for which frequency domain inspection is unsuitable). It would be of particular interest to have an inspection method for arrays with the increased precision, flexibility and reliability of electronic digital arithmetic without the inconvenience of holograms and chemical development for the particular pattern. The present invention provides such an inspection method and apparatus.

SUMMARY OF THE INVENTION

[0011] The hybrid technique of the present invention is basically a method for finding defects on digitized device images using a combination of spatial domain and frequency domain techniques. The two dimensional spectra of two images are found using Fourier like transforms. Any strong harmonics in the spectra are removed, using the same spectral filter on both spectra. The images are then aligned, transformed back to the spatial domain, and subtracted. The resulting spectrally-filtered difference image is thresholded and analyzed for defects.

[0012] Use of the hybrid technique of the present invention to process digitized images results in the highest-performance and most flexible defect detection system. It is the best performer on both array and random devices, and it can cope with problems such as shading variations and the dark-bright problem that no other technique can address.

[0013] The hybrid technique of the present invention also uses frequency domain techniques to align the images with more precision than spatial domain techniques such as the cubic shift. Further, the relative offsets of the pairs of images are determined by frequency domain techniques—and this method may be the most accurate and the least expensive.

[0014] There are three additional major benefits from the hybrid technique of the present invention:

[0015] 1. The hybrid technique automatically processes both array and random areas on the device;

[0016] 2. The hybrid technique is well-suited to the bright-dark problem (the array appears dark and low-contrast if the illumination is set for random, and the random saturates the camera, or sensor, if the illumination is adjusted for repeating) because the hybrid technique is much more powerful for repeating than random; and

[0017] 3. The hybrid technique can do additional frequency-domain processing virtually for free—for example, the shading problem can be solved (low frequency fluctuations across the image are eliminated by a high pass filter with a very low cut-off frequency), undesirable effects of the MTFs (modulation transfer function) of the optics and sensor may be compensated for, etc. MTF filtering is the shaping of the spectrum by multiplication with a transfer function (a function which multiples each part of the spectrum by the value of the MTF at that frequency; MTF values usually are between 0 and about 2).

BRIEF DESCRIPTION OF THE FIGURES

[0018]FIG. 1 is a flow chart that illustrates the basic defect identification method of the present invention.

[0019]FIG. 2 is a frequency domain plot of the transform of a device having a substantial repeating pattern and some random pattern, defects or noise.

[0020]FIG. 3 is an overall block diagram of an inspection system equipped to perform defect analysis by the transform method of the present invention.

[0021]FIG. 4 illustrates the sub-division of images captured by the optical systems of prior art inspection devices to create a sub-image for processing by the transform method of the present invention, assuming that the input images for the hybrid technique are 256×256.

[0022]FIG. 5 is a block diagram of an implementation of the transform method (on only one image at a time) of the present invention.

[0023]FIG. 6 is a block diagram that illustrates the canonical transform blocks of FIG. 5 in greater detail.

[0024]FIG. 7 is a block diagram that illustrates the inverse canonical transform blocks of FIG. 5 in greater detail.

[0025]FIG. 8 is a block diagram that illustrates the shifting filter for addition to the block diagram of FIG. 5 to perform the function of processing FOV2 of FIG. 1.

[0026]FIG. 9a is a block diagram that illustrates the functions of the upper portion of the third column of FIG. 1 in pipeline format.

[0027]FIG. 9b is a block diagram that illustrates the functions of the lower portion of the third column of FIG. 1 in pipeline format.

[0028]FIG. 10 is a partial flow chart that illustrates the changes necessary to the central portion of the flow chart of FIG. 1 to perform the image subtraction function in the frequency domain instead of the spatial domain as illustrated in FIG. 1.

[0029]FIGS. 11a-11 d illustrate one approach to the thresholding steps of the flow of FIG. 1.

[0030]FIGS. 12a-12 c illustrate three different features that might be filtered from each FOV.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

[0031] The present invention, in order to inspect both random and repeating patterns which may or may not be present on the same device, includes electronic techniques which are capable of high speed inspection of both types of patterns.

[0032] One may think of the image of a device pattern as being a superposition of four images: a random image; a repeating image; a noise image; and a defects image. That can be represented mathematically as

i(x,y)=rn(x,y)+rp(x,y)+n(x,y)+d(x,y)

[0033] where

[0034] i(x,y)=total device image;

[0035] rn(x,y)=random image portion of the device;

[0036] rp(x,y)=repeating image portion of the device;

[0037] n(x,y)=noise image (due to sensor, lighting or reflective fluctuations, etc.); and

[0038] d(x,y)=defect image or defect map (image changes due to defects).

[0039] Let the spectrum of the device image be

I(f _(X) ,f _(Y))=RN(f _(X) ,f _(Y))+RP(f _(X) ,f _(Y))+N(f _(X) ,f _(Y))+D(f _(X) ,f _(Y))

[0040] where

[0041] RN(f_(X),f_(Y))=the spectrum of rn(x,y)

[0042] RP(f_(X),f_(Y))=the spectrum of rp(x,y)

[0043] N(f_(X),f_(Y))=the spectrum of n(x,y)

[0044] D(f_(X),f_(Y))=the spectrum of d(x,y)

[0045] f_(X)=the frequency in the x direction

[0046] f_(Y)=the frequency in the y direction

[0047] The spectrum can be found by any two dimensional sinusoidal transform, such as the Fourier, Hartley or canonical transforms. Such transforms, called ‘Fourier-like’ transforms here, are all characterized by the fact that they represent an image as a sum of two dimensional sinusoids, that is, they transform an image in x and y into a number of sinusoidally-varying functions of x and y that, when all added together, are equal to the image.

[0048] Suppose that the repeating pattern has the periods T_(X) and T_(Y) in the x and y directions. Then the spectrum of rp(x,y) will consist entirely of two-dimensional sinusoids that repeat with one of these periods, that is, RP(f_(X),f_(Y)) will be entirely at the frequencies (f_(X),f_(Y)) where either f_(X) ε {0, 1/T_(X), 2/T_(X), . . . } or f_(Y) ε {0, 1/T_(Y), 2/T_(Y), . . . }. Therefore trimming I(f_(X),f_(Y)) by removing (zeroing out) all components at these frequencies will remove RP(f_(X),f_(Y)) from I(f_(X),f_(Y)). Since the trimmed frequencies form only a small portion of the total number of two dimensional frequencies it is expected that trimming will have only a minor effect on RN(f_(X),f_(Y)), N(f_(X),f_(Y)) and D(f_(X),f_(Y)), which are assumed to be spread with equal probability across all frequencies in any small area of the spectrum.

[0049] Thus the trimmed spectrum of the device image is

I′(f _(X) ,f _(Y))=RN′(f _(X) ,f _(Y))+N′(f _(X) ,f _(Y))+D′(f _(X) ,f _(Y)),

[0050] where

[0051] RN′(f_(X),f_(Y))=the trimmed spectrum of rn(x,y)=the spectrum of rn′(x,y)≈RN(f_(X),f_(Y))

[0052] N′(f_(X),f_(Y))=the trimmed spectrum of n(x,y)=the spectrum of n′(x,y)≈N(f_(X),f_(Y))

[0053] D′(f_(X),f_(Y))=the trimmed spectrum of d(x,y)=the spectrum of d′(x,y)≈D(f_(X),f_(Y)).

[0054] When I′(f_(X),f_(Y)) is inverted (by applying the inverse of the two dimensional transform previously described) the resulting processed image is

p(x,y)=rn′(x,y)+n′(x,y)+d′(x,y)≈rn(x,y)+n(x,y)+d(x,y),

[0055] and the repeating pattern has been successfully separated from the non-repeating parts of the device image i(x,y).

[0056] If the signal to noise ratio (SNR) of the device image i(x,y), where the defect image d(x,y) is the signal and the noise is n(x,y) (and where rn(x,y) is virtually non-existent), is sufficiently high, then the defect image peaks (the defects) can be separated from the noise by thresholding and/or pattern classification techniques, leaving the image d′(x,y)≈d(x,y).

[0057] The input images may be of any size. It is most convenient for digitally performing the 2-dimensional transforms if they have heights and widths that are powers of two, such as 256×512, or at least that are the products of many smaller factors, such as 480×480. Each pixel in the image is a number representing the intensity of the image, and typically the pixels consist of eight-bit data (256 grey levels). A crucial consideration in any digital implementation is the method of finding the spectrum of the image. Traditional methods of finding the spectrum of a digital image introduce two serious sources of noise. This noise, which is introduced by the transforming technique and is not present in the original image, necessarily lowers the sensitivity of the method. These two sources of transform noise are zero-padding of the image and period mismatch.

[0058] Zero-Padding Adds Noise

[0059] Usually digital transforms have been constrained to images whose dimensions are powers of two, and when the dimensions of the image have not been powers of two either some of the image was discarded or more pixels were added to the image and filled with arbitrary numbers, usually zeroes. Thus the usual approaches to finding the spectrum of a 480×480 image would have been either to take a 256×256 transform of part of the image, and thus obtain the exact spectrum of

(256)²/(480)²=28.44%

[0060] of the image, or to add

(512)²−(480)²=31,744

[0061] extra pixels with grey level zero to bring the image size up to 512×512, and then take a transform to find the exact spectrum of an image which has

31,744/(512)²=12.11%

[0062] of its contents incorrect (set to an arbitrary value that is independent of the data, and not containing a repeating array). The last approach clearly introduces a lot of extra noise into the spectrum, thus decreasing the SNR considerably and reducing the ability of the transform method to separate the noise from the defects.

[0063] A better, but impractically difficult, approach is to increase the size of the image using a repeating pattern from somewhere else in the image, but unless this was done perfectly (which would require exact period estimation, sub-pixel alignment and perfect, noise-free interpolation) it would still add considerable noise.

[0064] A still better approach is to use a transform technique that can take the transform of a 480×480 image directly, thus giving the exact discrete spectrum of the whole image. Such transforms do exist in the literature. They are all either special purpose transforms that can transform just a few image sizes, or are general purpose to the point where they can transform images whose dimensions have prime factorizations containing the numbers {2,3 . . . , N_(max)} where N_(max) can be up to about 17, but are considerably slower than the powers of two transforms and/or take a lot of memory to compute.

[0065] Not Matching the Image Dimensions to the Pattern Periods Adds Noise

[0066] A two dimensional discrete sinusoidal transform finds the spectrum of an image by assuming that the image replicates itself in all directions to infinity, as if the original image were a rectangular tile and identical tiles were laid out on a plane stretching to infinity. The transform then fits two dimensional sinusoids to the whole plane of tiles so that the sum of all of the sinusoids in the discrete spectrum produced by the transform is equal to the whole plane of tiles.

[0067] If the x and y dimensions of the original device image are integral multiples of the respective periods of the repeating pattern in the x and y directions, then the sinusoids found by the transform will also be those of the repeating pattern, as it is not possible to determine where one replication of the original device image ends and the next begins. The spectrum produced by the discrete transform shows the harmonics of the repeating pattern perfectly, and no noise has been introduced.

[0068] However if they are not integral multiples, then it is easy to see the borders of the replications of the original device image, and thus the spectrum of the whole plane (which is what is found by a discrete transform) will contain one set of harmonics for the repeating pattern and another for the laying of the device image replications next to one another. The two sets of harmonics will not coincide and, worse still, will interact in a much more complicated way than merely being added together in the spectrum. The net effect on the spectrum produced by the discrete transform is that the harmonics of the repeating pattern will be blurred or spread out across the spectrum, which necessarily reduces the SNR of the device. This may be viewed either as a lowering of the signal level because more frequencies must be zeroed out to eliminate the repeating pattern rp(x,y) from the spectrum, further reducing the information about the defects d(x,y), or it may be viewed as the addition of noise due to the harmonics caused by image replication.

[0069] Consider a sub-image formed by taking a rectangle out of the original 480×480 device image, and let

[0070] W=the number of pixels in the x direction in the sub-image (width),

[0071] H=the number of pixels in the y direction in the sub-image (height).

[0072] To avoid the decreased SNR due to not matching the period of the repeating pattern to the dimensions of the image that is transformed, one must clearly transform a W×H sub-image of the original device image where W and H are integral multiples of the x and y direction periods of the repeating pattern, respectively. Since the transform method will be required to analyze device images with differing periodicities of repeating pattern this in turn requires a transform technique capable of finding the spectrum of W×H sub-images for a wide range of W and H.

[0073] These Two Sources of Noise can be Avoided by Using Recently Developed Transform Algorithms

[0074] Transform algorithms now exist for finding the discrete spectra of images of most dimensions, at speeds comparable to the powers of two transforms and with no extra memory requirements. These transforms are as fast as the powers of two transforms if the dimensions of the image are powers of two, and their speed (normalized by dividing by the number of pixels in the image) decreases as the size of the prime factors of the dimensions increases. If the image dimensions are both prime numbers then the speed of the transform is no better than the straightforward transform computation (that is, it is no longer a “fast” transform).

[0075] This digital implementation of the transform method contains a transform that can transform any W×H sub-image where all of the prime factors in W or H are less than 100 (this figure could be raised further by increasing the size of arrays for intermediate computations, but the transforms are significantly slower for prime factors this large).

[0076] Finally, the type of discrete sinusoidal transform used in this implementation of the transform method is the canonical transform. The canonical transform is used instead of the Fourier transform because

[0077] it has recently been mathematically proven that the canonical transform is strictly faster to compute than any other type of discrete sinusoidal transform; and

[0078] it has some theoretical advantages such as not using imaginary numbers or negative frequencies, while possessing at least the level of notational convenience of the Fourier transform.

[0079] Summary of Steps in the Discrete Implementation of the Transform Method

[0080] To analyze a 480×480 pixel device image containing a repeating array for defects using the most accurate form of the transform method of the present invention:

[0081] 1. T_(X) and T_(Y), the periods of the repeating pattern in the x and y directions, are estimated by taking line or strip transforms in the x and y directions and observing the frequencies of the major components (harmonics).

[0082] 2. The input image undergoes period matching. In period matching a W×H sub-image is selected where

[0083] W and H are integral multiples of T_(X) and T_(Y) respectively;

[0084] W and H are each as large as possible, but not more than 480; and

[0085] W and H both have a prime factorization that allows the spectrum of the W×H sub-image to be quickly computed.

[0086] 3. The W×H sub-image is transformed to give its discrete spectrum.

[0087] 4. The spectrum is trimmed by

[0088] a. computing the two dimensional amplitude spectrum;

[0089] b. finding the x and y direction lines of local amplitude maxima—the harmonics; and

[0090] c. settling the spectrum components at the frequencies of the harmonics to zero.

[0091] 5. The spectrum components at very low frequencies are set to zero (a high pass filter) to remove the dc level and gradual fluctuations due to lighting or reflectivity variations etc. Spectrum reshaping, such as filtering matched to the optics and camera, has been tried at this point and found to improve defect detectability.

[0092] 6. The spectrum is inverse transformed to give the processed image.

[0093] 7. A histogram of the processed image is made. Such histograms approximately follow a double-sided truncated exponential distribution, so exponential curves are fit to it and measures of the width of the distribution on both sides are obtained. These two widths are multiplied by two insensitivity factors (“controls”) to obtain a low and a high threshold about the mean for the black and white defects respectively.

[0094] 8. The processed image is thresholded and any parts above the high threshold or below the low threshold are declared to be defects and their location, size etc. are noted.

[0095] While the above described method produces the most accurate result, in many applications the period matching and adjustable-size portions of the method in steps 1 and 2 can be eliminated without much loss of accuracy. In practice it was discovered that when the image being inspected included a good number of periods in both directions (on the order of 10 or more), then the inclusion of the period matching steps were found to improve the sensitivity of the method only marginally. A byproduct of omitting the period matching steps is that the pixels used on the image of the device are larger and thus the processing of the information becomes much faster. Another byproduct of not using period matching is that a fixed size transform (256×256, for example, is very convenient since CCD cameras give images that are in powers of 2) can be used.

[0096] Experimental Results

[0097] To test the feasibility of the digital implementation of the transform method of the present invention, some images of a single layer engineering device were prepared. The locations of the programmed defects were known. There were twelve sorts of defects (white spots, horizontal protrusions, etc.) and they ranged in size from 1.3 μm down to less than 0.1 μm. All of the defects were imaged at 10×, 20×, 40×, 64× and 100×, and under BFLD (brightfield) light and B100 light. BFLD lighting is the lighting normally used for imaging, comes from a large aperture, and provides partially coherent light (coherence ratio=0.7). B100 lighting is the lighting normally used for linewidth measurements, comes from a small aperture, and provides more coherent light (coherence ratio=0.3). Tests were run to attempt to find all of the defects under all of these conditions.

[0098] The results were:

[0099] All of the programmed defects were detected under the 40×, 64× and 100× magnifications and both lighting conditions. The lower the settings of the insensitivity controls the smaller the defects detected. It was relatively easy to detect 0.1 μm defects on the 40× images (0.5 μm pixel size). At the level of detection that detects 0.1 μm defects many circuit irregularities are legitimately classified as genuine defects.

[0100] At 20× (1.0 μm pixel size) and 10× (2.0 μm pixel size) magnification with BFLD light the programmed defects larger than about 0.32 μm and 0.65 μm, respectively, could be detected without incurring defects that were thought to be possible nuisance defects. Turning the insensitivity control lower resulted in smaller programmed defects being detected, but other “defects” were possibly nuisance defects. For example, while the insensitivity could be set so that all of the defects down to 0.35 μm in the 10× image could be detected it was not clear how many (if any) of the other “defects” were nuisance defects.

[0101] Some of the programmed defects that were detected by the transform method at 40× were not detectable by the prior random pattern inspection systems in its highest magnification mode (200×).

[0102] Detection ability was marginally better for BFLD lighting than for B100 lighting, for all magnifications. At 10× and 20× using B100 instead of BFLD reduced the pixel to defect ratio of the defects conservatively detected from about 3:1 to about 2.5:1.

[0103] Further Features of the Transform Method of the Present Invention:

[0104] The method requires just one device image (no comparison image).

[0105] The method preserves the shading, size and shape of the defect. In the processed image the size and shape of the defect is quite clearly visible if the defect is larger than a couple of pixels. If the defect is due to extra white material or missing black material it shows up as white in the processed image, and if the defect is due to extra black material or missing white material it shows up as black.

[0106] Other findings include:

[0107] If a device image at 40×, 64× or 100× is transformed, low-pass filtered, and inverse transformed it was found that if the low-pass filter eliminated all spectral components at frequencies a little higher than the first harmonic then the human eye could scarcely distinguish the original and processed image. On a 100× image the first harmonic typically is at about 0.10 or less of the Nyquist frequency of the spectrum (x or y direction), and at 40× it is typically 0.20 or less.

[0108] There appears to be little repeating-array energy beyond the first five harmonics or so, but there appears to be significant defect energy at these higher frequencies.

[0109] It was discovered that any low-pass filter reduced the sensitivity of the transform method of the present invention for small defects.

[0110] A method based on one dimensional (line) transforms instead of a two dimensional transform has also been shown to be able to detect defects. The hybrid and transform method work in the same way with one dimensional transforms—just transform an image by applying one dimensional transforms to each row in the image, instead of applying a two dimensional transform to the image. However, the sensitivity using one dimensional transforms is usually significantly less that the method based on two dimensional transforms—how much less has to be determined on a case by case basis.

[0111] Comments

[0112] If there is a repeating spatial pattern the frequency spectrum is going to have very strong spectral lines at frequencies corresponding to the period of a repeating cell. Thus, there will be a very strong first harmonic, second harmonic, third harmonic, etc. The first harmonic corresponds to something that repeats every cell width, the second harmonic corresponds to something that repeats twice per cell width, and so on. All of the information that repeats is going to form just a few frequency bands. So the idea is to take a transform and find the spectrum of an image, remove the frequency bands corresponding to the repeating bits, inverse transform back into the spatial domain, and what is left is a picture of anything that does not repeat—it includes random patterns, noise and defects.

[0113]FIG. 1 is a block diagram that illustrates the basic inspection system of the present invention. FOV1 and FOV2 (FOV is “Field Of View”) are two images that, in the absence of defects, should be the same except for some minor misalignment. One image might be from an actual device while the other might be from a description (e.g. precision drawing) of what the device should be, or both images might be two different corresponding views from the same device or two devices that should be identical.

[0114] The images that are to be compared are labelled FOV1 (2) and FOV2 (4). Each FOV is a pixel map of the image that for convenience has been selected to be 256×256 pixels, though the present invention is applicable to rectangular images of any size or aspect ratio. Each pixel in the two FOV maps is also selected to have a particular gray value. For convenience the gray value of each pixel is selected to be represented by an 8 bit word that yields a gray scale value of 0-255. Additionally, each FOV can be thought of as a superposition of three elements: the pattern on the device, noise and defects.

[0115] Looking first at how FOV1 (2) is processed, its spectrum is determined by taking a transform (6) of it. The transform may be any Fourier-like two dimensional transform, and in this example the canonical transform is used since it is the fastest and most convenient.

[0116] Details of Canonical transforms can be found in An Improved Approach to Harmonic Spectral Analysis, and the Canonical Transform by David Evans, December 1989, Stanford University PhD Thesis in Electrical Engineering.

[0117]FIG. 2 illustrates the frequency domain representation of a device following the taking of the transform. The device of interest here is one with a repeating pattern, no random pattern, and some defects or noise. By inspecting the frequency domain plot it can be observed that there are areas where there is not much information as well as areas where there are well defined, steep-sloped, tall ridges. Those ridges are the harmonics that correspond to the repeating features in FOV1. The other features, the random pattern, defects and noise, transform into the small blips that typically appear in those areas where the ridges do not occur, as illustrated in FIG. 2 in the region below frequencies f_(x1) and f_(y1).

[0118] The low frequency variations in FIG. 2 could also be caused by a possible curve to the surface of the device. If the curve is only slowly varying then it will be at a low frequency, however, if it is quickly varying it will be attributable to the pattern on the device itself.

[0119] At step (8) (FIG. 1) those harmonics are removed by zeroing them out. In the memory containing the data values of the transform, the data points that correspond to the ridges are replaced with zero values. Then, what ever filtering that might be desirable to perform in the frequency domain is done (9). For example, remove high frequency values, remove noise, invert the transform effects introduced at low frequencies, and so on. Additionally, this method allows for the compensation of the MTF of the optics—which the In-Systems method is incapable of doing, since it is only practical to compensate for MTFs by digital means.

[0120] Next, the modified spectrum is inverse transformed (10) back into the spatial domain. At this stage the repeating array pattern has been removed, leaving only the random pattern, noise and defects. A threshold is then selected (12) between the noise and the defects to remove the noise component that remains which leaves the large defects for analysis (14).

[0121] The inspection path of FOV2 (4) is the same as the inspection path of FOV1 (2) with the exception of a shifting filter 22, that will be discussed below, following the harmonics removal (8′). The same operations are performed on FOV2 with each of the like blocks having been numbered the same as the blocks for FOV1 with a prime symbol added.

[0122] The third column in FIG. 1 is for alignment and comparison of the FOV1 and FOV2. Often the physical machinery has already aligned the FOV1 and FOV2 to within a few pixels, typically 5 pixels. To make a comparison between the two FOVs one must be subtracted from the other. Hence, before subtraction, FOV2 must be shifted so that it is aligned with FOV1. The more misalignment that remains, the more noise that will be introduced by the subtraction process and thus the more the sensitivity of the technique will be reduced.

[0123] There are two parts to the alignment process: finding the relative offsets Δx and Δy (the required amounts by which FOV2 must be shifted in order to align it with FOV1), and shifting FOV2.

[0124] To determine Δx and Δy, in the present invention uses the correlation theorem of transforms. This says that the transform of the correlation surface of two images is equal to the product of the transform of one image (6) with the conjugation of the transform of the other image (16) (this is true exactly as stated for either the Fourier or canonical transforms, using complex and shiftor arithmetic respectively). Further, the correlation surface is a function of the offsets between the images—its value is the linear correlation between the two images. In FIG. 1 the conjugate of the transform of FOV2 is multiplied by the transform of FOV1 (18) with the result undergoing an inverse transformation (10″) which yields the correlation surface. The peaks of the correlation surface, which are located at Δx and Δy, are then detected (20) by only looking within a few pixels of the origin of the surface since the mechanics of obtaining the FOVs already ensure that they are aligned to within a few pixels. This method for finding Δx and Δy is the most accurate method possible, by definition, and is therefore very reliable. There are some spatial domain methods that can come close to giving similar performance to this method, but they are not as reliable, they are not quite as accurate and given that the transforms of FOV1 and FOV2 are available, they are generally not as economical or as fast.

[0125] To align the FOVs electronically means that it is necessary to use a technique for interpolating between the two sets of grid points of the two FOVs since the shift required to align the FOVs usually contains fractions of pixels. For example, actual alignment might require that FOV2 be moved Δx=2.34 pixels in the x direction and Δy−−1.79 pixels in the y direction. Typical electronic alignment shifts are performed in the spatial domain, and all of them introduce significant interpolation errors—which must be regarded as noise in the resultant shifted FOV2. For example, the cubic interpolator uses a 4×4 array of pixels in the unshifted FOV to determine each pixel in the shifted FOV—the 4×4 array consists of the weights that are put on the surrounding 4×4 pixels when forming the interpolation average—so a mere 16 pixels in the unshifted image are taken into account to produce each pixel in the shifted image.

[0126] The method illustrated in the top portion of the third column of FIG. 1 shifts FOV2 in the frequency domain, unlike the prior art which performs the shifting in the spatial domain. The result of the frequency domain shift is that it is a perfect shift without the introduction of any noise which would have been introduced in a spatial domain shift. Thus, in the method of the present invention shifting filter 22 alters the offsets, relative to the origin on the x-y plane, of each two dimensional sinusoid in the spectrum of FOV2 (i.e. it alters the two dimensional ‘phases’). For each two dimensional sinusoid in the spectrum of FOV2, the precise offsets are easily calculated from Δx and Δy using trigonometry, and then applied. In effect, all of the pixels in the unshifted image are taken into account to produce each pixel in the shifted image.

[0127] The total alignment process of determining and applying the required offsets is thus most efficiently, reliably and accurately applied in the frequency domain and introduces only a very small amount of noise relative to performing the same offset corrections in the spatial domain (there is some noise when working in the frequency domain because even the best Δx and Δy may not be perfect). As a matter of economy, since the two images have already been transformed into the frequency domain to apply the transform method of the present invention to them, it is relatively cheap in time and equipment to also apply frequency domain alignment techniques to them. Thus, this is an inherent advantage of the hybrid technique of the present invention.

[0128] The two fields of view are processed simultaneously from corresponding sites or corresponding die, etc. The same transform is applied to both FOVs with the same linear filtering being performed on the image spectrums to remove the harmonics and other features. Then the modified spectrums are transformed back into the spatial domain (10, 10′) where the resultant modified spatial images can be subtracted (24), one from the other.

[0129] The processed images from the FOVs and the difference image formed at 24 are each then thresholded in order to separate the noise from any defects that might be present. In thresholding an image the maximum absolute value of grey level at each pixel due to noise alone is estimated, and the pixels with absolute grey levels above that threshold are declared to be candidate defect sites. The thresholding in the three images performed at 12, 12′ and 12″, could possibly use different threshold levels. In steps 12 and 12′ the shadowing effect that resulted from the trimming of the spectra of FOV1 and FOV2 is also taken into account. When the spectrum of an image is trimmed some sinusoids that contribute to a defect are also removed. Consequently, when the spectrum is inverse transformed back into the spatial domain any defect will also be exhibited at locations that are integral numbers of cell lengths from the actual location. That is, these shadows of the defect will be found above and below, to the left and to the right, of the actual location in the original FOV signal, at distances corresponding to integral multiples of the size of the repeating pattern in the original image. Further, the shadows are always of the opposite color of the defect—a white defect has black shadows and a black defect has white shadows. Additionally, the shadows are always less strong than the actual defect. All of these features thus make the shadows easy to identify and remove from the defect map—all defects that are an integral number of cell widths or heights from a stronger defect of an opposite color are thus ignored.

[0130] The real defects are then found by one of two methods. If there are a huge number of defect candidates in the processed images (more than could reasonably be expected to actually exist in the two images), then the processed images are ignored and all of the candidate defects in the difference image (14″) are considered to be defects (this will be the case if the original images include some random pattern). If the number of candidate defects in the processed images is not huge (i.e. the number of candidate defects are reasonable for an image), then those candidate defects are considered to be defects and the difference image is ignored (this will be the case if the original images include only repeating patterns). The selection of which candidate defects to declare as real defects are made in step 28 and presents the list at 30.

[0131] The transform method of the present invention effectively takes an average of every cell in the whole image by taking many, many cells into account to build a very accurate picture of what the cell should look like. Thus, it is very sensitive to defects, which are deviations from what the cell should look like. The hybrid technique of the present invention incorporates that transform method and automatically applies it to images containing repeating patterns. Hence, the hybrid technique is very sensitive to defects in the repeating areas of a device. In the random areas of a device, the hybrid technique of the present invention automatically selects the defect map obtained by comparing the two images after aligning them in an almost noiseless manner and applying various frequency domain filters. In summary, the hybrid technique of the present invention automatically applies either the transform method or an enhanced, and relatively noiseless, version of the comparison algorithm.

[0132] Numerous filtering approaches might be used in the optional filtering steps 9 and 9′. In FIGS. 12a-12 c three possible filtering criteria are illustrated. In FIG. 12a the high-pass filtering of the image is illustrated to remove the low frequency variations in the image in both the x and y directions. FIG. 12b illustrates the filtering of the harmonic signals in both the x and y directions. Finally, FIG. 12c illustrates typical MTF compensation filtering in the x and y directions.

[0133] Blocks 12, 12′ and 12″ of FIG. 1 each specify the thresholding of the signals in the various paths which can be performed by any of a number of a wide range of numerical shortcuts or approximations. FIGS. 11a-11 d illustrate the use of logarithms to perform that function. In FIG. 11a there is shown a double-sided truncated exponential noise distribution without any defects, and which is shown wider than one would usually encounter for illustration purposes (usually this curve would only be about 10 levels wide). When the log of the function of FIG. 11a is taken the resultant log plot is shown in FIG. 11b, and as per this approach “a” is selected as the lower threshold and “b” is selected as the upper threshold. FIG. 11c illustrates a plot that contains defects which is similar to that of FIG. 11a, and FIG. 11d shows the log plot of the function of FIG. 11c. In FIG. 11d the log plot of FIG. 11c is shown with the black defects shown at the left end of the response below the log of “a” and the white defects shown to the right of the log of “b”.

[0134] In FIG. 1 image subtraction to form the difference image is done in the spatial domain since it occurs after the inverse transform steps 10 and 10′ in the first and second columns. This approach was selected since it requires less hardware to achieve that result. It could just as well be performed in the signals for each FOV in the frequency domain before the inverse transformations are made. FIG. 10 illustrates how this could be done by showing the central region of the flow chart of FIG. 1 such that the filtered FOV1 and FOV2 are subtracted one from the other immediately before the inverse transformations are performed. By performing this function in the frequency domain there is an additional inverse transform step 10′″ that is required in the third column which was not required in the implementation of FIG. 1.

[0135] As described above, thresholdings are performed for three images at 12, 12′ and 12″ to separate the noise from any defects that might be present. An object of this invention is to provide an automatic thresholding scheme that generates a variable threshold on the fly to optimize the defect detection. Defect detection relies on the fact that defective pixels have higher gray levels that the normal residual or noise gray levels. The processed residual images from the FOVs and the difference image typically have a histogram that follows an exponential distribution if there is no defect. The defect, if it exists, must have gray levels outside the normal exponential distribution. The histogram can be regarded as a probability distribution on the image pixel gray levels. I the distribution can be estimated, a threshold can be chosen to satisfy a certain pre-defined probability for which the detected defective pixel may be noise or normal residual patterns. In general, the threshold level is selected so that defects detected have a small likelihood of being noise or normal residual patterns.

[0136] In order to determine the exponential distribution for the histogram, an exponential function A exp(−Cw) can be fitted to the histogram H(w), w=0, 1, 2, . . . , 255, using techniques such as least squares estimation, where A and C are two constants governing the distribution. To simplify the estimation, the logarithms of H(w) can be taken to fit a straight line, i.e.

log (H(w))=log A−Cw for w=0, 1, 2, . . . , 255

[0137] Constants A and C can easily be estimated from the above equation based on estimation theory. In Practice, if defects exist in the residual image, the gray levels of defective pixels disturb the normal histogram distribution and appear at the tail of the histogram. When the desired exponential distribution is to be estimated, the tail of the histogram is examined and the abnormal part should be ignored to maintain the smoothness of the histogram. After the distribution has been estimated, the desired threshold can be selected using pre-defined criteria. A convenient criterion of setting the threshold is to choose a threshold amplitude, w_(t), that satisfies log (H(w_(t)))=0. Dependent on the requirements of the user, the selected threshold amplitude can be adjusted to offer more sensitive or less sensitive inspection.

[0138] Implementation

[0139]FIG. 3 illustrates a general inspection system which includes the transform method of the present invention. An optical inspection system for inspecting a device 50 is typically built around a central processor 64 which controls and integrates the operation of each of the component systems of the overall inspection system. One of those components is an x-y stage 52 on which device 50 is mounted to be moved by stage control 54 beneath optical column 56 to illuminate and image the entire surface of interest. This is necessary since most devices are larger than the area that the optical system can capture at any point in time.

[0140] Optical column 56 is in turn controlled by illuminator control 58 with detector 60 converting the optical image of device 50 into pixel signals, each pixel of a selected grey scale value. In the discussion of the present invention it is presumed that each pixel is encoded in 8 bits to provide a grey scale range of 0-255, however, the present invention is not limited to pixels of eight bits, fewer or more bits could also be used with the system of the present invention. The pixel data from detector 60 is then stored temporarily in an image buffer 62 before all, or portions, of that image are transferred to the transform system 76 or to RAM 66 for longer term storage.

[0141] The inspection system of FIG. 3 also includes the usual support elements for processor 64, namely RAM 66, ROM 68 and I/O 70 which interact with processor 64 and each other via a data bus. Also communicating via the data bus, as necessary, are image buffer 62 and transform system 76.

[0142] For reasons of symmetry it was decided for the experimental transform system that square images would be processed. Additionally it was noted that the computation of the necessary transforms in hardware was considerably easier if the dimensions of the image to be processed was a power of two in each direction. Further, a smaller dimension was also preferred because it requires less transform calculation per pixel, and because it gives more flexibility in efficiently dividing the images of the full images of the most popular inspection systems now on the market into sub-images for processing with the transform method of the present invention. In order to be able to keep the processing time for the transform method of the present invention within a reasonable length of time, the portion of the image of device 50 that can efficiently be handled by the transform method of the present invention, given the present technology, may be smaller than the image area that can be handled by other inspection techniques.

[0143] In FIG. 4 three of the most popular inspection image sizes are illustrated, namely 480x480 pixels, 575×739 pixels and 256×2048 pixels. Assuming that the image size to be used with the present invention is 256×256 pixels, each of the popular image sizes are shown divided into sub-images for use with the transform method of the present invention. For example, in the 480×480 the resulting division results in four sub-images with some overlap in both the x and the y directions, in the 575×739 the resulting division results in six sub-images with some overlap in the x direction and not full coverage in the y direction, and finally in the 256×2048 the resulting division results in eight sub-images which have no overlap in either direction and which cover the entire original image size. Therefore in the experimental implementation of the present invention it was decided to divide the original images from the various inspection systems into sub-images of 256×256 pixels and to apply the transform method independently to each sub-image.

[0144] The transform method of the present invention processes each sub-image independently, which as well as eliminating alignment noise in the algorithm, also simplifies the image acquisition and allows for a high degree of parallel processing. Thus, not only can corresponding sub-images from two different fields-of-view be processed at the same time (see FIG. 1), it is also possible, given enough hardware, to simultaneously and independently process more than one sub-image from the same field-of-view at the same time. That is sub-images 1-4, or 1-6, or 1-8 (see FIG. 4) could all be processed simultaneously since the processing of one sub-image does not depend on information determined in the processing of any other sub-image.

[0145]FIG. 5 illustrates, in pipe-line form, the implementation of the left column in the flow chart of FIG. 1 for the first field-of-view. A substantially similar pipe-line is also necessary for processing the sub-image from the second field-of-view and a modified pipe-line with inputs from the pipe-lines for the first and second fields-of-view is also necessary for each inspection.

[0146] To simplify the illustration of the pipe-line of FIG. 6 only a single line is shown interconnecting each of the blocks of the diagram with a “/” and an associated number to indicate the number of bits transferred on each line or set of lines. Thus the number associated with each line indicates the number of bits and the number of interconnecting lines between the corresponding blocks.

[0147] For convenience of discussion, each pipe-line is divided into several stages as indicated in FIG. 5 (stage numbers in squares). Each sub-image is thus processed by each stage in turn until a defect list is output from the final stage. Additionally, each stage has been implemented to take the same amount of time to execute. The image processing operations performed in each sub-image and the stages over which each operation is accomplished are:

[0148] Operation

[0149] Stages

[0150] 1. Transform sub-image to 2-dimensional spectrum 1,2

[0151] 2. Trim harmonics from 2-dimension spectrum 2,3,4

[0152] 3. Filter the 2-dimensional spectrum 3,4

[0153] 4. Inverse transform filtered 2-dimension spectrum for 256×256 sub-image of noise and defects 4,5

[0154] 5. Determine noise/defects threshold w/histogram 5,6

[0155] 6. Threshold the noise/defects sub-image 7

[0156] 7. Report the defects 8

[0157] Stage 1

[0158] Initially the pixel information of the sub-image to be processed from detector 60 is input into RAM 0 (100) (image buffer 62, FIG. 3) from which the pixel information is applied to FBT1 (102) (fast canonical transform) where the rows of the sub-image are transformed. In order to simplify FIG. 5 the operation of the FBT and FBTinverse blocks (102, 106, 130 and 134), since they are substantially the same as each other and somewhat complicated, the representative block diagram that represents each of them is shown in FIG. 6. It should be noted that in FIG. 6 “IB” stands for the “number of input bits” (either 8, 16 or 24 bits) and “OB” stands for the “number of output bits” (either 16 or 24 bits).

[0159] Thus, in operation FBT1 (102) with reference to FIG. 6, the inputs to registers 160-164 are obtained from RAM 0 (100) in FIG. 5. For each pair of rows of the sub-image the elements of the two rows are permuted into bit-reversed order by physically reversing the eight address lines of the row index in register 160. One of the permuted rows, row 1 for purposes of this discussion, is treated as the real input and the other permuted row, row 2, as the imaginary input which are alternately applied to the Fast Fourier transform chip (A41102) 168. In this application the input words to FFT chip 168 are 8 bit words with 16 bit words as outputs. The output of FFT chip 168 is the one-dimensional complex length-256 Fourier transform, F(v), v=0,1, . . . 255 of the rows. The real and imaginary output components from FFT 168 are alternately (170) applied to registers 172 and 174, respectfully. Then with the use of alternators 176 and 178, together with adders 180 and 182, the FFT real and imaginary components of F(v)=F_(real) (v)+iF_(imag) (v) in registers 172 and 174, are converted into the two one-dimensional real length-256 canonical transforms, B₁(v)=(B_(C1)(v), B_(S1)(v)) and B₂(V)=(B_(C2)(v), B_(S2)(V)), v=0,1, . . . , 128, of rows 1 and 2 respectfully:

[0160] for v ε {1, 2, . . . , 127}: $\begin{matrix} {{B_{C1}(v)} = {{F_{real}(v)} + {F_{real}\left( {256 - v} \right)}}} \\ {{B_{S2}(v)} = {{F_{real}(v)} - {F_{real}\left( {256 - v} \right)}}} \\ {{B_{S1}(v)} = {{- {F_{imag}(v)}} + {F_{imag}\left( {256 - v} \right)}}} \\ {{B_{C2}(v)} = {{F_{imag}(v)} + {F_{imag}\left( {256 - v} \right)}}} \\ {{B_{C1}(0)} = {2{F_{real}(0)}}} \\ {{B_{C1}(128)} = {2{F_{real}(128)}}} \\ {{B_{C2}(0)} = {2{F_{imag}(0)}}} \\ {{B_{C2}(128)} = {2{F_{imag}(128)}}} \\ {{B_{S1}(0)} = {{B_{S1}(128)} = {{B_{S2}(0)} = {{B_{S2}(128)} = 0}}}} \end{matrix}$

[0161] Additionally, the bit-reversed output of the FFT chip 168 is piped through two 16-bit adders 180 and 182, and rows 1 and 2 are replaced with B₁(v) and B₂(v), respectively, and placed in RAM 1 (104) (see FIG. 5).

[0162] Stage 2

[0163] The resulting transform of the rows stored in RAM 1 (104) is applied to FBT2 (106) to transform the columns of the sub-image. The operation of FBT2 (106) is also illustrated by reference to FIG. 6. This functions similarly to the way FBT1 (102) functions as described above with the columns of the partially converted sub-image in RAM 1 (104) instead of the rows to determine the two-dimensional canonical transform of the input image

B(v ₂ ,v ₁)=(B _(CC)(c ₂ ,c ₁), B _(CS)(v ₂ ,v ₁), B _(SC)(v ₂ ,v ₁), B _(SS)(v ₂ ,v ₁)),

[0164] v₂=0, 1, . . . 128, v₁=0, 1, . . . , 128. Here FFT chip 168 uses 16 bits of input and 24 bits of output, and adders 180 and 182 are 24 bit adders.

[0165] Returning to FIG. 5, the canonical transform of the sub-image is then stored in RAM 2 (108). The absolute value of the 16 most significant bits of the two-dimensional transform from FBT2 (106) is determined by removing the sign bit (110). The amplitude profiles, AP1 and AP2, of registers 116 and 118, respectfully, are created by adding the absolute value of the 16 most significant bits of B(v₂,v₁) to both AP1(v₁) and AP2(v₂). This yields the profiles along the x and the y axes.

[0166] Stage 3

[0167] In this stage the horizontal and vertical lines which need to be trimmed from the two dimensional spectrum, due to (1) trimming the harmonics and (2) filtering the spectrum, are determined. The sole effect of stage 3 is to set the elements of the two 128×1 filter profile vectors FP1(v₁) (f_(x) direction) and FP2 (v₂) (f_(y) direction), v₂=0, 1, . . . , 128, v₁=0, 1, . . . 128, to 0, 1, or an intermediate value. The profile vectors are stored in registers 122 and 124 as they are created. This is accomplished by an algorithm in μController 1 (120) that looks at the amplitude profiles, AP1 and AP2, in registers 116 and 118, to detect the peaks, that is, locates the harmonics in the f_(x) and f_(y) directions. Once the peaks are located, a 0 is placed in each of the FP1 locations corresponding to spectral lines detected on amplitude profile 1 (AP1) and a 1 is placed in the remaining FP1 locations. FP2 is created similarly from AP2.

[0168] Stage 4

[0169] The two dimension canonical transform of the sub-image in RAM 2 (108) is then modified by multiplying FP1 and FP2 with that spectrum with multipliers 126 and 128. Each pair of columns of the two dimensional spectrum of the sub-image is trimmed and filtered by multiplying each two dimensional canonical transform value B(v₂,v₁) by FP1(v₁) and FP2(v₂).

[0170] Then the inverse transform the columns of the trimmed and filtered 256×256 canonical transform spectrum is then performed by FBT_(inverse) 1 (130) which is shown in expanded form in FIG. 7 which is substantially similar to the transform block diagram of FIG. 6 basically with the data flowing in the reverse direction from that of FIG. 6. Additionally, since in the first half of the procedure the rows were dealt with first, the columns are dealt with first here. One column (col 1) is treated as the first 1 Dimensional real length-256 canonical transform B₁(v)=(B_(C1)(v), B_(S1)(v)), v=0,1, . . . , 128, and a second column (col 2) is treated as the second one dimensional real length-256 canonical transform B₂(v)=(B_(C2)(v), B_(S2)(v)), v=0,1, . . . , 128: for v {1,2, . . . , 127}: $\begin{matrix} {{F_{real}(v)} = {{B_{C1}(v)} + {B_{S2}(v)}}} \\ {{F_{real}\left( {N - v} \right)} = {{B_{C1}(v)} - {B_{S2}(v)}}} \\ {{F_{imag}(v)} = {{B_{C2}(v)} - {B_{S1}(v)}}} \\ {{F_{imag}\left( {N - v} \right)} = {{B_{C2}(v)} + {B_{S1}(v)}}} \\ {{F_{real}(0)} = {B_{C1}(0)}} \\ {{F_{real}(128)} = {B_{C1}(128)}} \\ {{F_{imag}(0)} = {B_{C2}(0)}} \\ {{F_{imag}(128)} = {B_{C2}(128)}} \end{matrix}$

[0171] Actually this also multiplies all of the F(v) values by 2, but this is compensated for when the Fourier inverse transform is performed in A41102 in the next step. The performance of the one dimensional complex length-256 Fourier inverse transform on F(v), yields a complex output with col 1 as the real part and col 2 as the imaginary part. The third A41102 has a 24 bit input, and a 24 bit output. Next, the elements of the two columns are permuted into bit-reversed order by physically reversing the eight address lines of the index of F(v) as the columns are passed from a buffer to the 256×256 array. Finally, the original two columns of the 256×256 two dimensional canonical transform are replaced with the processed columns and stored in RAM 3 (132).

[0172] Stage 5

[0173] Here the rows of the column-inverse-transformed 256×256 array from RAM 3 (132) are transformed in FBT_(inverse) 2 (134) (see FIG. 7 for details) to yield the processed sub-image. The operation at this point is the same as for FBT_(inverse) 1 (130) as discussed above with the rows being worked on here instead of the columns. Here the fast Fourier transform chip, A41102, uses 24 bits in input and 16 bits of output. This processed sub-image contains only image noise and defects and is stored in RAM 4 (136). The repeating pattern was removed by the filtering of the ridges in the transform spectrum, as discussed above. The 256×1 8-bit histogram vector, H(w), w=0,1, . . . , 255, of the processed sub-image is formed in register 138 and adder 140 using the highest eight bits of noise. This is accomplished by taking a copy of the appropriate 8 bits of each processed sub-image value as it is being stored, interpret the eight bits as w, and increment H(w) using 16 bit adder 140.

[0174] Stage 6

[0175] In this stage the lower and upper noise/defect thresholds are determined from the histogram, H(w), of the processed sub-image. This is accomplished by estimating the width of the noise distribution and setting the thresholding look-up-table, T(w) for w=0,1, . . . , 255.

[0176] If there are no defects then H(w) is the distribution of the noise. However the presence of defects obscures the noise distribution, especially at the tails of the noise distribution—which are the regions of the greatest interest. By fitting a two-sided exponential distribution to H(w) in the region of the histogram where the number of noise samples dominates the number of defects (the non-tail regions), the width of the noise distribution can be estimated. In the current implementation of the transform method, the logarithms of H(w) are calculated, straight lines are fitted to the logs of the distribution, and the width is calculated by intercepting these lines with a given probability density.

[0177] Microcontroller 2 (142) estimates the thresholds from the values of H(w) in register 138. As with microcontroller 1 (120), microcontroller 2 (142) is dedicated to this stage and runs in isolation needing only to be synchronized with the rest of the systems.

[0178] Once the threshold levels have been determined, each of the values of T(w) are set to either 1 (if a grey level of w signifies a defect because it is outside the noise thresholds) or 0 (for no defect) by microcontroller 2 (142) and those values stored in register 144.

[0179] Stage 7

[0180] In this stage of the operation, the processed sub-image is thresholded and the defective pixels are merged into defects. The presence of a defect at a pixel site can be determined by interpreting the 8 bits of the processed sub-image values that were used to form the histograms, an 8-bit number w. If T(w)=0 then there is no defect at the pixel site and if T(w)=1 then there is a defect at that pixel site. Since a defect may be larger than a single pixel in size, pixels that are close together wherein each is identified as having a defect, a single defect is identified that occurs in more than one pixel of the processed sub-image. The location, grey level and defect membership of all of the defective pixels are then stored.

[0181] Microcontroller 3 (146) directs the search of all of the 256×256 pixels of the sub-image from RAM 4 (136) for defects in conjunction with the values of T in thresholding look-up-table 144, and stores the results in RAM 5 (148). As with the other microcontrollers, microcontroller 3 (146) is dedicated to this stage and can run in isolation except for the requirement that it be synchronized with the operation of the rest of the system.

[0182] The input to this stage is the processed sub-image and the output is a list of defects that contain all of the information about the defects that is obtainable from the transform method of the present invention without the need for an intermediate binary image. The search will proceed by raster-scanning the sub-image until a defect is found and than a search in the region around the defect for more defective pixels belonging to the same defect. To prevent multiple reportings of a single defective pixel, the pixel histogram value, H, is replaced by a non-defective value in the processed image once it is found.

[0183] Stage 8

[0184] This, the final stage, reports the defects to the main processor 64, and performs defect classification, if desired. This function is performed by microcontroller 4 (150) with it dedicated to this stage and it can run in isolation except for synchronization with the rest of the system, as is the case with each of the other microcontrollers.

[0185] If additional classification is required then additional microcontroller stages can be added here at a low cost. Such additional stages could, for example, perform classification tasks utilizing statistical information from previously processed sub-images.

[0186] Column 2 of FIG. 1 is identical to column 1 in all respects (even in the use of the same filters, parameters for analysis, timing masks, etc.) except for the addition of shifting filter 22—which functions as described above to align the two images. Shifting filter 22 uses trigonometry operating on Δx and Δy to align the two images by adjusting the phases of the 2-dimensional sinusoids specified by the transform of FOV2.

[0187]FIG. 8 illustrates the addition of shifting filter 22 (FIG. 1 FOV2) to the pipeline diagram of FOV1 in FIG. 5 to convert that diagram for use for FOV2 of column 2. The diagram of FIG. 8 for FOV2 operation is inserted serially in line 129 between multiplier 128 and FBTinverse 1 130 as indicated in FIG. 8. The implementation in FIG. 8 is only one of many implementations that might be made and this implementation is included here for illustration purposes.

[0188] Referring to FIG. 8, the FOV2 signal, after the removal of the harmonics, on line 129 is applied to a double buffer input RAM 506, and the Δx and Δy signals from the third column of FIG. 1 are applied to μcontroller (x-shift) 502 and μcontroller (y-shift) 504, respectively. Each of μcontrollers 502 and 504 compute the angles a₁ and a₂, respectively, from Δx and Δy, and the sin and cos functions of the corresponding angle. From RAM 506 the signals B_(CC) and B_(CS) are on bus 508 and the signals B_(SC) and B_(SS) are on bus 510 for application to complex number multipliers 512 and 514, and cross-over circuit 516 to generate the signals B′_(CC)(v₂,v₁) and B′_(SC)(v₂,v₁) on bus 518, and B′_(CS)(v₂,v₁) and B′_(SS)(v₂,v₁) on bus 520, as per the following equations for v₂=0, 1, . . . , 128 and v=0, 1, . . . , 128,

B′ _(CC)(v ₂ ,v ₁)=cos(a ₁)B _(CC)(v ₂ ,v ₁)−sin(a ₁)B _(CS)(v ₂ ,v ₁)

B′ _(CS)(v ₂ ,v ₁)=sin(a ₁)B _(CC)(v ₂ ,v ₁)−cos(a ₁)B _(CS)(v ₂ ,v ₁)

B′ _(SC)(v ₂ ,v ₁)=cos(a ₁)B _(SC)(v ₂ ,v ₁)−sin(a ₁)B _(SS)(v ₂ ,v ₁)

B′ _(SS)(v ₂ ,v ₁)=sin(a ₁)B _(SC)(v ₂ ,v ₁)−cos(a ₁)B _(SS)(v ₂ ,v ₁)

[0189] resulting in the B′_(CC) and B′_(SC) signals on bus 518, and the B′_(CS) and B′_(SS) signals on bus 520. Complex multipliers 522 and 524 then multiply (cos a₂, sin a₂) with the signals on buses 518 and 520 to generate B″_(CC) and B″_(SC) signals on bus 526, and the B″_(CS) and B″_(SS) signals on bus 528 as per the following equations for v₂=0, 1, . . . , 128 and v₁=0, 1, . . . , 128,

B″ _(CC)(v ₂ ,v ₁)=cos(a ₂)B′ _(CC)(v ₂ ,v ₁)−sin(a ₂)B′ _(CS)(v ₂ ,v ₁)

B″ _(SC)(v ₂ ,v ₁)=sin(a ₂)B′ _(CC)(v ₂ ,v ₁)−cos(a ₂)B′ _(CS)(v ₂ ,v ₁)

B″ _(CS)(v ₂ ,v ₁)=cos(a ₂)B′ _(CS)(v ₂ ,v ₁)−sin(a ₂)B′ _(CS)(v ₂ ,v ₁)

B″ _(SS)(v ₂ ,v ₁)=sin(a ₂)B′ _(CS)(v ₂ ,v ₁)−cos(a ₂)B′ _(CS)(v ₂ ,v ₁)

[0190] where a₁=2πv₁Δx/W and a₂=2πv₂Δy/H

[0191] Those signals are then applied to double buffered RAM 530 for application of the shifted signals to FBTinverse 1 130 of FIG. 5 (inverse transform block 10′ of FIG. 1).

[0192] Note that the x variable is associated with the width W, the subscript 1 and the last subscript on the B′s; and that the y variable is associated with the height H, the subscript 2 and the first subscript on the B′s. That is, the 2-D sinusoid $\begin{matrix} {{{B_{CC}\left( {v_{2},v_{1}} \right)}\quad {\cos \left( {2\quad \pi \quad v_{2}{y/H}} \right)}\quad {\cos \left( {2\quad \pi \quad v_{1}{x/W}} \right)}} +} \\ {{{B_{CS}\left( {v_{2},v_{1}} \right)}\quad {\cos \left( {2\quad \pi \quad v_{2}{y/H}} \right)}\quad {\sin \left( {2\quad \pi \quad v_{1}{x/W}} \right)}} +} \\ {{{B_{SC}\left( {v_{2},v_{1}} \right)}\quad {\sin \left( {2\quad \pi \quad v_{2}{y/H}} \right)}\quad {\cos \left( {2\quad \pi \quad v_{1}{x/W}} \right)}} +} \\ {{B_{SS}\left( {v_{2},v_{1}} \right)}\quad {\sin \left( {2\quad \pi \quad v_{2}{y/H}} \right)}\quad {\sin \left( {2\quad \pi \quad v_{1}{x/W}} \right)}} \end{matrix}$

[0193] in the unshifted image becomes the 2-D sinusoid $\begin{matrix} {{{B_{CC}^{''}\left( {v_{2},v_{1}} \right)}\quad {\cos \left( {2\quad \pi \quad {{v_{2}\left\lbrack {y - {\Delta \quad y}} \right\rbrack}/H}} \right)}\quad {\cos \left( {2\quad \pi \quad {{v_{1}\left\lbrack {x - {\Delta \quad x}} \right\rbrack}/W}} \right)}} +} \\ {{{B_{CS}^{''}\left( {v_{2},v_{1}} \right)}\quad {\cos \left( {2\quad \pi \quad {{v_{2}\left\lbrack {y - {\Delta \quad y}} \right\rbrack}/H}} \right)}\quad {\sin \left( {2\quad \pi \quad {{v_{1}\left\lbrack {x - {\Delta \quad x}} \right\rbrack}/W}} \right)}} +} \\ {{{B_{SC}^{''}\left( {v_{2},v_{1}} \right)}\quad {\sin \left( {2\quad \pi \quad {{v_{2}\left\lbrack {y - {\Delta \quad y}} \right\rbrack}/H}} \right)}\quad {\sin \left( {2\quad \pi \quad {{v_{1}\left\lbrack {x - {\Delta \quad x}} \right\rbrack}/W}} \right)}} +} \\ {{B_{SS}^{''}\left( {v_{2},v_{1}} \right)}\quad {\sin \left( {2\quad \pi \quad {{v_{2}\left\lbrack {y - {\Delta \quad y}} \right\rbrack}/H}} \right)}\quad {\sin \left( {2\quad \pi \quad {{v_{1}\left\lbrack {x - {\Delta \quad x}} \right\rbrack}/W}} \right)}} \end{matrix}$

[0194] in the shifted image.

[0195]FIGS. 9a and 9 b are provided to illustrate the functions of the upper and lower portions of the blocks in the third column of FIG. 1, respectively. FIG. 9a, and the upper portion of the third column of FIG. 1, calculate any offset that exists between the images of the two fields of view, FOV1 and FOV2, and provides a real number for each value, Δx and Δy, to shifting filter 22 in the second column of FIG. 1 or to μcontrollers 502 and 504, respectively, of FIG. 8. This is performed by first conjugating and multiplying the transformed signals from transform blocks 6 and 6′ in the first and second columns of FIG. 1 by 2D multiplier/adder 600 as per the following equations.

[0196] The details of the conjugation and multiplication operations, for the canonical transform, are as follows. Let B₁(v₂,v₁) be the 2-D canonical transform of FOV1, let B2(v₂,v₁) be the 2-D canonical transform of FOV2, and let B2(v₂,v₁) be the 2-D canonical transform of the correlation surface of FOV1 and FOV2. Then, for v₂=0,1 . . . , 128 and v₁=0, 1, . . . , 128, $\begin{matrix} {{B_{CC}\left( {v_{2},v_{1}} \right)} = {{{B_{1{CC}}\left( {v_{2},v_{1}} \right)}*{B_{2{CC}}\left( {v_{2},v_{1}} \right)}} +}} \\ {\quad {{{B_{1{CS}}\left( {v_{2},v_{1}} \right)}*{B_{2{CS}}\left( {v_{2},v_{1}} \right)}} +}} \\ {\quad {{{B_{1{SC}}\left( {v_{2},v_{1}} \right)}*{B_{2{SC}}\left( {v_{2},v_{1}} \right)}} +}} \\ {\quad {{B_{1{SS}}\left( {v_{2},v_{1}} \right)}*{B_{2{SS}}\left( {v_{2},v_{1}} \right)}}} \\ {{B_{CS}\left( {v_{2},v_{1}} \right)} = {{{B_{1{CC}}\left( {v_{2},v_{1}} \right)}*{B_{2{CS}}\left( {v_{2},v_{1}} \right)}} -}} \\ {\quad {{{B_{1{CS}}\left( {v_{2},v_{1}} \right)}*{B_{2{CC}}\left( {v_{2},v_{1}} \right)}} +}} \\ {\quad {{{B_{1{SC}}\left( {v_{2},v_{1}} \right)}*{B_{2{SS}}\left( {v_{2},v_{1}} \right)}} -}} \\ {\quad {{B_{1{SS}}\left( {v_{2},v_{1}} \right)}*{B_{2{SC}}\left( {v_{2},v_{1}} \right)}}} \\ {{B_{SC}\left( {v_{2},v_{1}} \right)} = {{{B_{1{CC}}\left( {v_{2},v_{1}} \right)}*{B_{2{SC}}\left( {v_{2},v_{1}} \right)}} +}} \\ {\quad {{{B_{1{CS}}\left( {v_{2},v_{1}} \right)}*{B_{2{SS}}\left( {v_{v2},v_{1}} \right)}} -}} \\ {\quad {{{B_{1{SC}}\left( {v_{2},v_{1}} \right)}*{B_{2{CC}}\left( {v_{2},v_{1}} \right)}} -}} \\ {\quad {{B_{1{SS}}\left( {v_{2},v_{1}} \right)}*{B_{2{CS}}\left( {v_{2},v_{1}} \right)}}} \\ {{B_{SS}\left( {v_{2},v_{1}} \right)} = {{{B_{1{CC}}\left( {v_{2},v_{1}} \right)}*{B_{2{SS}}\left( {v_{2},v_{1}} \right)}} -}} \\ {\quad {{{B_{1{CS}}\left( {v_{2},v_{1}} \right)}*{B_{2{SC}}\left( {v_{2},v_{1}} \right)}} -}} \\ {\quad {{{B_{1{SC}}\left( {v_{2},v_{1}} \right)}*{B_{2{CS}}\left( {v_{2},v_{1}} \right)}} +}} \\ {\quad {{B_{1{SS}}\left( {v_{2},v_{1}} \right)}*{B_{2{CC}}\left( {v_{2},v_{1}} \right)}}} \end{matrix}$

[0197] There are several possible implementations of this operation, of which the straightforward arrangement shown in FIG. 9a is one. The multipliers and adders shown in FIG. 9a are for 24-bit real arithmetic.

[0198] The combined surface characteristics of the two surfaces of FOV1 and FOV2 from 2D multiplier/adder 600 is then applied to RAM 601, followed by serial application to FBTinverse1 (columns) 602, RAM 603, FBTinverse2 (rows) 604 and RAM 605 for double buffering the combined images in the same way that the same blocks 130-136 of FIG. 5. The combined image from RAM 605 is then applied to μcontroller 605 for detection of the highest peaks on the combined surface, to determine the location of those points and to report them to within a few hundredths of a pixel as Δx and Δy to align the image of FOV2 with that of FOV1.

[0199] The lower portion of the third column of FIG. 1, as discussed above, is provided to present the difference between FOV1′ and FOV2′ in the spatial domain, where FOV1′ and FOV2′ are the images in the first and second column of FIG. 1, respectively, after the repeating patterns have been removed. One implementation for performing that function is shown in FIG. 9b with FOV1′ and FOV2′ applied to adder 606 to form the difference image. The combined image is then applied to blocks 608-622, which function in the same way as blocks 136-150 of FIG. 5, to provide the defects which are presumed to be the differences between FOV1 and FOV2. From that point the resulting defect list from FIG. 9b is combined with those from blocks 14 and 14′ of FIG. 1, and as discussed above, to generate the complete defect list for the two images.

[0200] The present invention also includes the ability to do device pattern inspection within a single device pattern, where the pattern to be inspected is a repeating pattern. That can be done by either a subset of the present device, namely the FOV1 column from FIG. 1, or doing two (possibly different) patterns at once using columns FOV1 and FOV2 of FIG. 1. That is, just apply the ‘transform method’ wherein the hybrid algorithm is a combination of the transform method and die-to-die comparison.

[0201] In the above discussion of the method and apparatus of the inspection system of the present invention the handling of only the first two rows and columns where discussed for simplicity. In actual operation there is no difference between the handling of any adjacent pair of rows and columns, including the first and the last. Each adjacent pair of rows and columns are processed in the same way as any other pair.

[0202] While the discussion above has been focused on the use of canonical transforms, it should be noted that any type of sinusoidal (Fourier-like) transform could be used—Fourier, canonical, Hartley, cosine or sine. There are an infinite number of such transforms—they are all characterized by the fact that they represent an image as a sum of two-dimensional sinusoids (i.e. they transform the image into a number of sinusoidally-varying, functions of x and y that, when all added together, equal the image). The cost of using a complex transform (such as the Fourier transform) compared to a real-only transform (such as the canonical or Hartley transforms) is to double the amount of computation that needs to be done, which results in twice as many FFT chips in the implementation.

[0203] Any of these infinite number of transforms, both complex and real-only, can be cheaply computed using an FFT (Fast Fourier Transform) chip, and all of the transforms are tools for doing ‘Fourier analysis’ which is not to be confused with having to use the Fourier transform. The cheapest and easiest transform to use is the canonical transform which is why the above discussion used it to explain the present invention. If the Fourier transform were to be used, for example, it would result in a cost of slightly more than twice as much computation as with the canonical transform.

[0204] With the present invention to perform the inspection process with greatest accuracy a uniform illumination is necessary of the region being inspected. Thus, to insure that occurs the inspection area should be smaller than the illumination area. Further, the present invention is independent of whether the area of the substrate that is involved in the inspection is a full or a sub die, or multiple dies. Additionally, the present invention lends itself to the inspection intra- or inter-die, or a combination of both.

[0205] The transformations and reverse transformations discussed above could be performed in either the analog or the digital domain. Analog transformations are well known in the art, and digital transformations may be somewhat less well known. However, digital transformation techniques are well documented in R. N. Bracewell, “The Hartley Transform”, 1986, Oxford Univ. Press, Oxford, Eng., and R. N. Bracewell, “The Fourier Transform”, 1965, Oxford Univ. Press, Oxford, Eng.

[0206] It should also be understood that the present invention is not limited to being used to inspect semiconductor substrates. This invention, and each of its embodiments have application to the inspection of any surface where it is important that the pattern be reliably repeatable between individual pieces. Thus, the present invention can be used to inspect wafers of various forms and materials, and reticles, photomasks, flat panels, and any other device that the user may be interested in inspecting for consistency one to another.

[0207] While the above discussion has attempted to describe and illustrate several alternative embodiments and implementations of the present invention, it is not possible to illustrate or to anticipate all embodiments and applications of the present invention. However, with the disclosure provided the necessary changes that would be needed to various other embodiments and applications would be obvious to one skilled in the art. Therefore, the scope of protection for the present invention is not to be limited by the scope of the above discussion, but rather by the scope of the appended claims. 

What is claimed is:
 1. In an inspection system for detecting defects in devices of any type having either random, repeating or mixed patterns within the same device, said inspection system includes first and second fields of view each positioned along a different optic axis, the first field of view creates a spatial domain pixel map of a portion of a first substrate pattern; and said second field of view provides a spatial domain pixel map against which said first substrate pattern is to be checked from either a pre-stored pixel map of the desired pattern, a scaled drawing of the desired pattern, a repeating pattern within the same device on said first substrate as in said first field of view, a pattern within a different device on said first substrate as in said first field of view, or a second substrate pattern; a method for detecting defects in said first substrate pattern in said first field of view comprising the steps of: a. transforming said pixel maps from said first and second fields of view using a two dimensional Fourier like transform to convert those pixel maps from the spatial domain to the frequency domain; b. identifying those frequencies in both dimensions having amplitude maxima in the frequency domain of step a. with the repeating pattern portions of each of said pixel maps from said first and second fields of view occurring at those frequencies in the frequency domain; c. entering zero values for the amplitudes at the frequencies in both dimensions identified in step b. to remove the amplitude at the harmonic frequency values of the repeating portions of said first and second fields of view; and d. inverse transforming the results from step c. using the inverse of the two dimensional Fourier like transformation of step a. to obtain modified spatial domain pixel maps of said first and second fields of view with the repeating patterns removed.
 2. A method as in claim 1 further comprising the steps of: e. conjugating one of said frequency domain maps of said first and second fields of view from step a.; f. multiplying the conjugated frequency domain map from step e. with the other frequency domain map of said first and second fields of view in step a. that was not conjugated in step e.; g. inverse transforming the result of step f. using the inverse of the two dimensional Fourier like transformation of step a. to create the correlation surface of the patterns of said first and second fields of view that is a function of the spatial offset between those patterns; h. identifying the peaks of the correlation surface of step g. along both the x and y axis, the location of those peaks representing the offset, Δx and Δy, between the first and second field of view patterns; and before performing step d.: i. trigonometrically altering the two dimensional sinusoids of the frequency domain map of the pattern of one of the first and second fields of view from step c. using the x and y axis offset values of step h.
 3. A method as in claim 1 further comprising the steps of: j. subtracting one of said spatial domain pixel maps of step d. from the other of said spatial domain pixel maps of step d. to form a composite spatial domain pixel map that contains only the combined noise and defects of said two spatial domain pixel maps; k. filtering, individually, each of the modified spatial domain pixel domain maps of steps d. and composite spatial domain map of step j. using a threshold amplitude that is selected to be above the expected noise level and below the expected defect level, to remove defect shadows introduced by the inverse transformation step d. where each defect shadow is an integral multiple of each defect with the shadows further being of the opposite color from the real defect and of a lessor amplitude, each resulting further modified spatial domain pixel pattern including the random and defects for each of said first and second fields of view and only defects for said composite spatial pixel pattern of step j.; and l. comparing the three further modified spatial domain pixel patterns from step k. to determine the defects present in said first field of view original pixel image.
 4. A method as in claim 3 wherein in step k. the threshold amplitude is selected by an exponential thresholding technique.
 5. A method as in claim 3 wherein step l. includes the steps of: m. comparing said further modified spatial domain pixel patterns of said first and second fields of view to determine the number of amplitude peaks of each of said patterns; and n. identifying the location of defects as those occurring at the amplitude peaks in said further modified composite spatial domain pixel map from step k. if the number of peaks identified for both said first and second fields of view in step m. are both large numbers indicating that there are numerous random pattern portions in the original first and second fields of view.
 6. A method as in claim 3 wherein step l. includes the steps of: o. comparing said further modified spatial domain pixel patterns of said first and second fields of view to determine the number of amplitude peaks of each of said patterns; and p. identifying the location of defects as those occurring at the amplitude peaks in said further modified spatial domain pixel map of said first field of view from step k. if the number of peaks identified for both said first and second fields of view in step o. are both small numbers indicating that there are few or no random pattern portions in the original first and second fields of view.
 7. A method as in claim 2 further comprising the steps of: q. subtracting one of said spatial domain pixel maps of step d. from the other of said spatial domain pixel maps of step d. to form a composite spatial domain pixel map that contains only the combined noise and defects of said two spatial domain pixel maps; r. filtering, individually, each of the modified spatial domain pixel domain maps of steps d. and composite spatial domain map of step q. using a threshold amplitude that is selected to be above the expected noise level and below the expected defect level, to remove defect shadows introduced by the inverse transformation step d. where each defect shadow is an integral multiple of each defect with the shadows further being of the opposite color from the real defect and of a lessor amplitude, each resulting further modified spatial domain pixel pattern including the random and defects for each of said first and second fields of view and only defects for said composite spatial pixel pattern of step q.; and s. comparing the three further modified spatial domain pixel patterns from step r. to determine the defects present in said first field of view original pixel image.
 8. A method as in claim 7 wherein in step r. the threshold amplitude is selected by an exponential thresholding technique.
 9. A method as in claim 7 wherein step s. includes the steps of: t. comparing said further modified spatial domain pixel patterns of said first and second fields of view to determine the number of amplitude peaks of each of said patterns; and u. identifying the location of defects as those occurring at the amplitude peaks in said further modified composite spatial domain pixel map from step r. if the number of peaks identified for both said first and second fields of view in step t. are both large numbers indicating that there are numerous random pattern portions in the original first and second fields of view.
 10. A method as in claim 7 wherein step s. includes the steps of: v. comparing said further modified spatial domain pixel patterns of said first and second fields of view to determine the number of amplitude peaks of each of said patterns; and w. identifying the location of defects as those occurring at the amplitude peaks in said further modified spatial domain pixel map of said first field of view from step r. if the number of peaks identified for both said first and second fields of view in step v. are both small numbers indicating that there are few or no random pattern portions in the original first and second fields of view.
 11. A method as in claim 1: preceding step d. further comprising the step of: x. subtracting one of said frequency domain pixel maps of step c. from the other of said frequency domain pixel maps of step c. to form a composite frequency domain pixel map that contains only the combined noise and defects of-said two frequency domain pixel maps; and the method of claim 1 further comprising the steps of: y. inverse transforming the results from step x. using the inverse of the two dimensional Fourier like transformation of step a. to obtain a modified spatial domain pixel map of said composite pixel map of step x.; z. filtering, individually, each of the modified spatial domain pixel domain maps of steps d. and composite spatial domain map of step y. using a threshold amplitude that is selected to be above the expected noise level and below the expected defect level, to remove defect shadows introduced by the inverse transformation step d. where each defect shadow is an integral multiple of each defect with the shadows further being of the opposite color from the real defect and of a lessor amplitude, each resulting further modified spatial domain pixel pattern including the random and defects for each of said first and second fields of view and only defects for said composite spatial pixel pattern of step x.; and aa. comparing the three further modified spatial domain pixel patterns from step z. to determine the defects present in said first field of view original pixel image.
 12. A method as in claim 11 wherein in step z. the threshold amplitude is selected by an exponential thresholding technique.
 13. A method as in claim 11 wherein step aa. includes the steps of: ab. comparing said further modified spatial domain pixel patterns of said first and second fields of view to determine the number of amplitude peaks of each of said patterns; and ac. identifying the location of defects as those occurring at the amplitude peaks in said further modified composite spatial domain pixel map from step z. if the number of peaks identified for both said first and second fields of view in step ab. are both large numbers indicating that there are numerous random pattern portions in the original first and second fields of view.
 14. A method as in claim 11 wherein step aa. includes the steps of: ad. comparing said further modified spatial domain pixel patterns of said first and second fields of view to determine the number of amplitude peaks of each of said patterns; and ae. identifying the location of defects as those occurring at the amplitude peaks in said further modified spatial domain pixel map of said first field of view from step z. if the number of peaks identified for both said first and second fields of view in step z. are both small numbers indicating that there are few or no random pattern portions in the original first and second fields of view.
 15. A method as in claim 1 wherein said two dimensional Fourier like transform of step a. and the inverse transform of step d. are digital transforms.
 16. A method as in claim 1 preceding step d. further including the step of: af. low pass filtering, individually, each of said first and second fields of view from step c. along both the f_(x) and f_(y) axis at frequencies below the lowest frequencies at which zero values were entered in step c. to remove the harmonic echoes of the random patterns, defects and noise that will occur at values of x and y in the spatial domain below the locations of the first location of the repeating pattern removed in step c. when step d. is performed.
 17. A method as in claim 1 preceding step d. further including the step of: ag. filtering, individually, each of said first and second fields of view from step c. along both the f_(x) and f_(y) axis for compensating the system modular transfer function.
 18. In an inspection system for detecting defects in devices of any type having either random, repeating or mixed patterns within the same device, said inspection system includes first and second fields of view each positioned along a different optic axis, the first field of view creates a spatial domain pixel map of a portion of a first substrate pattern; and said second field of view provides a spatial domain pixel map against which said first substrate pattern is to be checked from either a pre-stored pixel map of the desired pattern, a scaled drawing of the desired pattern, a repeating pattern within the same device on said first substrate as in said first field of view, a pattern within a different device on said first substrate as in said first field of view, or a second substrate pattern; a method for detecting defects in said first substrate pattern in said first field of view comprising the steps of: a. individually identifying and removing the repeating pattern portion of each of said first and second spatial domain pixel maps in the frequency domain to create modified first and second spatial domain pixel maps; b. individually identifying and removing the random pattern portion of each of said modified first and second spatial domain pixel maps in the spatial domain to create further modified first and second spatial domain pixel maps; and c. individually and collectively examining said further modified first and second spatial domain pixel maps in the spatial domain.
 19. In an inspection system for detecting defects in devices of any type having either random, repeating or mixed patterns within the same device, said inspection system includes first and second fields of view each positioned along a different optic axis, the first field of view creates a first spatial domain pixel map of a portion of a first substrate pattern; and said second field of view provides a second spatial domain pixel map against which said first substrate pattern is to be checked from either a pre-stored pixel map of the desired pattern, a scaled drawing of the desired pattern, a repeating pattern within the same device on said first substrate as in said first field of view, a pattern within a different device on said first substrate as in said first field of view, or a second substrate pattern; a method for detecting defects in said first substrate pattern in said first field of view comprising the steps of: a. generating a residual spatial domain pixel map by subtracting one of said first and second spatial domain pixel maps from the other of said first and second spatial domain pixel maps; b. determining the pixel gray level histogram of said residual spatial domain pixel map of step a.; c. fitting the histogram of step b. to an exponential distribution function; d. determining a threshold amplitude that is above the expected noise level and below the expected defect level from said exponential distribution function of step c.; and e. thresholding said residual spatial domain pixel map of step a. with the determined threshold from step d. to identify all of those values that exceed said threshold as defects in said first spacial domain pixel map.
 20. In an inspection system for detecting defects in devices of any type having either random, repeating or mixed patterns within the same device, said inspection system includes first and second fields of view each positioned along a different optic axis, the first field of view creates a first spatial domain pixel map of a portion of a first substrate pattern; and said second field of view provides a second spatial domain pixel map against which said first substrate pattern is to be checked from either a pre-stored pixel map of the desired pattern, a scaled drawing of the desired pattern, a repeating pattern within the same device on said first substrate as in said first field of view, a pattern within a different device on said first substrate as in said first field of view, or a second substrate pattern; a method for detecting defects in said first substrate pattern in said first field of view comprising the steps of: a. generating a residual spatial domain pixel map by removing the repeating pattern from said first spatial domain pixel map; b. determining the pixel gray level histogram of said residual spatial domain pixel map of step a.; c. fitting the histogram of step b. to an exponential distribution function; d. determining a threshold amplitude that is above the expected noise level and below the expected defect level from said exponential distribution function of step c.; and e. thresholding said residual spatial domain pixel map of step a. with the determined threshold from step d. to identify all of those values that exceed said threshold as defects in said first spacial domain pixel map.
 21. An inspection system for detecting defects in devices of any type having either random, repeating or mixed patterns within the same device comprising: a processor for controlling the operation of said inspection system; first and second fields of view means each under the control of said processor and each positioned along a different optic axis, the first field of view for creating a first spatial domain pixel map of a first substrate pattern, and said second field of view for providing a second spatial domain pixel map against which said first substrate pattern is to be checked from either a pre-stored pixel map of the desired pattern, a scaled drawing of the desired pattern, a repeating pattern within the same device on said first substrate as in said first field of view, a pattern within a different device on said first substrate as in said first field of view, or a second substrate pattern; a transform system for individually identifying and removing repeating patterns from each of said first and second spatial domain pixel maps, said transform system includes: transform means for individually transforming said first and second spatial domain pixel maps into first and second frequency domain pixel maps using a two dimensional Fourier like transform; harmonic trimming means for individually determining the frequencies of said first and second frequency domain pixel maps in both dimensions having amplitude maxima and individually zeroing out the values at the frequencies at which the maxima values are detected to create modified first and second frequency domain pixel maps; and first inverse transformation means for transforming said modified first and second frequency domain pixel maps using the inverse of said two dimensional Fourier like transformation to obtain into modified first and second spatial domain pixel maps without the repeating patterns of said first and second spatial domain pixel maps.
 22. An inspection system as in claim 21 wherein said transform system further includes: conjugation means for conjugating one of said first and second frequency domain pixel maps; multiplication means for multiplying said conjugated one of first and second frequency domain pixel maps with the other of said first and second frequency domain pixel maps to create a multiplied frequency domain pixel map; second inverse transformation means for inverse transforming said multiplied frequency domain pixel map using the inverse of said two dimensional Fourier like transform to create a correlation surface of the patterns of said first and second spatial domain pixel maps, said correlation surface being a function of the spatial offset between said first and second spatial domain pixel maps; peak identification means for identifying the peaks of said correlation surface along both the x and y axis with the location of those peaks representing the offset, Δx and Δy, between said first and second spatial domain pixel maps; and alignment means for trigonometrically altering the two dimensional sinusoids of one of said modified first and second frequency domain pixel maps using the Δx and Δy axis offset values identified by said peak identification means.
 23. An inspection system as in claim 21 further comprises: subtraction means for subtracting one of said modified first and second spatial domain pixel maps from the other of said modified first and second spatial domain pixel maps to form a composite modified spatial domain pixel map that contains only the combined noise and defects of both of said modified first and second spatial domain pixel maps; threshold means for individually filtering each of said modified first and second spatial domain pixel maps and said composite spatial domain pixel map using a threshold amplitude that is selected to be above the expected noise level and below the expected defect level, to remove defect shadows introduced by said first inverse transformation means where each defect shadow is an integral multiple of each defect with the shadows further being of the opposite color from the real defect and of a lessor amplitude, each resulting further modified first and second spatial domain pixel maps including the random and defects for each of said first and second spatial domain pixel maps and said modified composite spatial domain pixel map containing only defects for said composite spatial domina pixel map; and defect determination means for comparing all three of said further modified first and second spatial domain pixel maps and said modified composite spatial domain pixel map to determine the defects present in said first spatial domain pixel map.
 24. An inspection system as in claim 23 wherein in the threshold means the threshold amplitude is selected by an exponential thresholding technique.
 25. An inspection system as in claim 23 wherein said defect determination means includes: comparison means for comparing all three of said further modified first and second spatial domain pixel maps and said modified composite spatial domain pixel map to determine the number of amplitude peaks of each of said pixel maps; and identification means for identifying the location of defects as those occurring at the amplitude peaks in said modified composite spatial domain pixel map as identified by said threshold means if the number of peaks identified for both of said further modified first and second spatial domain pixel maps by said comparison means are both large numbers indicating that there are numerous random pattern portions in said first and second spatial domain pixel maps.
 26. An inspection system as in claim 23 wherein defect determination means includes: comparison means for comparing all three of said further modified first and second spatial domain pixel maps and said modified composite spatial domain pixel map to determine the number of amplitude peaks of each of said pixel maps; and identification means for identifying the location of defects as those occurring at the amplitude peaks in said further modified first and second spatial domain pixel maps if the number of peaks identified for both of said further modified first and second spatial domain pixel maps are both small numbers indicating that there are few or no random pattern portions in the original first and second fields of view.
 27. An inspection system as in claim 21: subtraction means for subtracting one of said modified first and second frequency domain pixel maps from the other of said modified first and second frequency domain pixel maps to form a composite frequency domain pixel map that contains only the combined noise and defects of both of said modified first and second frequency domain pixel maps; and second inverse transform means for transforming said composite frequency domain pixel maps using the inverse of the two dimensional Fourier like transform used by said transform means to a composite spatial domain pixel map; threshold means for individually filtering each of said modified first and second spatial domain pixel maps and said composite spatial domain pixel map using a threshold amplitude that is selected to be above the expected noise level and below the expected defect level, to remove defect shadows introduced by said first inverse transformation means where each defect shadow is an integral multiple of each defect with the shadows further being of the opposite color from the real defect and of a lessor amplitude, each resulting further modified first and second spatial domain pixel maps including the random and defects for each of said first and second spatial domain pixel maps and said modified composite spatial domain pixel map containing only defects for said composite spatial domain pixel map; and defect determination means for comparing all three of said further modified first and second spatial domain pixel maps and said modified composite spatial domain pixel map to determine the defects present in said first spatial domain pixel map.
 28. An inspection system as in claim 27 wherein in the threshold means the threshold amplitude is selected by an exponential thresholding technique.
 29. An inspection system as in claim 23 wherein said defect determination means includes: comparison means for comparing all three of said further modified first and second spatial domain pixel maps and said modified composite spatial domain pixel map to determine the number of amplitude peaks of each of said pixel maps; and identification means for identifying the location of defects as those occurring at the amplitude peaks in said modified composite spatial domain pixel map as identified by said threshold means if the number of peaks identified for both of said further modified first and second spatial domain pixel maps by said comparison means are both large numbers indicating that there are numerous random pattern portions in said first and second spatial domain pixel maps.
 30. An inspection system as in claim 27 wherein defect determination means includes: comparison means for comparing all three of said further modified first and second spatial domain pixel maps and said modified composite spatial domain pixel map to determine the number of amplitude peaks of each of said pixel maps; and identification means for identifying the location of defects as those occurring at the amplitude peaks in said further modified first and second spatial domain pixel maps if the number of peaks identified for both of said further modified first and second spatial domain pixel maps are both small numbers indicating that there are few or no random pattern portions in the original first and second fields of view.
 31. An inspection system for detecting defects in devices of any type having either random, repeating or mixed patterns within the same device comprising: a processor for controlling the operation of said inspection system; first and second fields of view means each under the control of said processor and each positioned along a different optic axis, the first field of view for creating a first spatial domain pixel map of a first substrate pattern, and said second field of view for providing a second spatial domain pixel map against which said first substrate pattern is to be checked from either a pre-stored pixel map of the desired pattern, a scaled drawing of the desired pattern, a repeating pattern within the same device on said first substrate as in said first field of view, a pattern within a different device on said first substrate as in said first field of view, or a second substrate pattern; repeating pattern identification means for individually identifying and removing the repeating pattern portion of each of said first and second spatial domain pixel maps in the frequency domain to create modified first and second spatial domain pixel maps; random pattern identification means for individually identifying and removing the random pattern portion of each of said modified first and second spatial domain pixel maps in the spatial domain to create further modified first and second spatial domain pixel maps; and defect identification means for individually and collectively examining said further modified first and second spatial domain pixel maps in the spatial domain.
 32. An inspection system for detecting defects in devices of any type having either random, repeating or mixed patterns within the same device comprising: a processor for controlling the operation of said inspection system; first and second fields of view means each under the control of said processor and each positioned along a different optic axis, the first field of view for creating a first spatial domain pixel map of a first substrate pattern, and said second field of view for providing a second spatial domain pixel map against which said first substrate pattern is to be checked from either a pre-stored pixel map of the desired pattern, a scaled drawing of the desired pattern, a repeating pattern within the same device on said first substrate as in said first field of view, a pattern within a different device on said first substrate as in said first field of view, or a second substrate pattern; generation means for generating a residual spatial domain pixel map by subtracting one of said first and second spatial domain pixel maps from the other of said first and second spatial domain pixel maps; histogram means for determining the pixel gray level histogram of said residual spatial domain pixel map of said generation means; fitting means for fitting the histogram of the histogram means to an exponential distribution function; selection means for determining a threshold amplitude that is above the expected noise level and below the expected defect level from said exponential distribution function of said fitting means; and thresholding means for thresholding said residual spatial domain pixel map with the determined threshold to identify all of those values that exceed said threshold as defects in said first spacial domain pixel map.
 33. An inspection system for detecting defects in devices of any type having either random, repeating or mixed patterns within the same device comprising: a processor for controlling the operation of said inspection system; first and second fields of view means each under the control of said processor and each positioned along a different optic axis, the first field of view for creating a first spatial domain pixel map of a first substrate pattern, and said second field of view for providing a second spatial domain pixel map against which said first substrate pattern is to be checked from either a pre-stored pixel map of the desired pattern, a scaled drawing of the desired pattern, a repeating pattern within the same device on said first substrate as in said first field of view, a pattern within a different device on said first substrate as in said first field of view, or a second substrate pattern; generation means for generating a residual spatial domain pixel map by removing the repeating pattern from said first spatial domain pixel map; histogram means for determining the pixel gray level histogram of said residual spatial domain pixel map of said generation means; fitting means for fitting the histogram of the histogram means to an exponential distribution function; selection means for determining a threshold amplitude that is above the expected noise level and below the expected defect level from said exponential distribution function of said fitting means; and thresholding means for thresholding said residual spatial domain pixel map with the determined threshold to identify all of those values that exceed said threshold as defects in said first spacial domain pixel map. 